package com.example.pojo;

import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;
import javax.validation.constraints.Min;
import javax.validation.constraints.Size;

/**
 * @program: springboot_course
 * @description: 用户实体类
 * @author: ChenZhiXiang
 * @create: 2019-06-11 09:19
 **/
@Data
public class User {

    @NotBlank(message = "用户名不能为空")
    private String name;
    @NotBlank(message = "ERP不能为空")
    @Size(min = 3, message = "ERP长度不能小于3")
    private String erp;
    @Min(value = 22, message = "年龄不能低于22岁")
    private int age;
}
